import { Type, Expose } from 'class-transformer';
import { IsInt, IsOptional, IsString, Min } from 'class-validator';

export class FindServiceOptionsDto {
  @IsOptional()
  @Type(() => Number)
  @IsInt()
  @Min(1)
  page = 1;

  @IsOptional()
  @Type(() => Number)
  @IsInt()
  @Min(1)
  size = 20;

  @Expose({
    name: 'start_time',
  })
  @Type(() => Number)
  @IsInt()
  startTime: number;

  @Expose({
    name: 'end_time',
  })
  @Type(() => Number)
  @IsInt()
  endTime: number;
}
